var N = 50;

for (var number = 1; number < N; number++)
{
    if ((number % 3 === 0 && number % 7 === 0) === false)
    {
        console.log(number);
    }
}